Use init-connect and binlog in MySQL to track user operations, init-connectbinlog
Preface:In the test environment, several important data records are deleted. Because only the public account is deleted in the binlog, you cannot query who logged on
Transferred from: http://blog.sina.com.cn/s/blog_605f5b4f01013xkv.htmlMySQL uses Init-connect+binlog to implement user operation tracking log record of Access IPin MySQL, each connection executes the Init-connect first, and the connection is
Preface:Test environment inexplicably have a few important data is deleted, because in Binlog only see is the public account deleted, unable to query is that who logged in that time period, consider how to record every MySQL account login
The test environment is inexplicably deleted from several important data records. Since only the public account is deleted in the binlog, you cannot query who logged on to the database during that time period.
The test environment is inexplicably
in the In MySQL, each connection executes the Init-connect first, and the connection is initialized. Here we can get the user's login name and the thread ID value. Then with Binlog, we can trace the operation time of each operation statement,
Init-connet Settings Note: This parameter does not take effect for super users--Creating a test library mysql> create database test; Query OK, 1 row Affected (0.00 sec) mysql> use test;database changed--creating audit record table mysql> create
The current community version of MySQL's audit function is still relatively weak, plug-based audit currently exists in the Enterprise version of MySQL, Percona and mariadb, but the MySQL community version has a init-connect option, based on which we
The current community version of MySQL's audit function is still relatively weak, plug-based audit currently exists in the Enterprise version of MySQL, Percona and mariadb, but the MySQL community version has a init-connect option, based on which we
The MySQL connection is first initialized via Init-connect and then connected to the instance.We take advantage of this by recording the user's thread_id, user name and user address in Init-connect to achieve DB access auditing.Implementation steps1.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.